home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickTime / QuickTime 3 Interfaces & Libs / QTDevWin / CIncludes / PPCToolbox.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-21  |  22.3 KB  |  538 lines  |  [TEXT/dosa]

  1. /*
  2.      File:        PPCToolbox.h
  3.  
  4.      Contains:    Program-Program Communications Toolbox Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    QuickTime 3.0
  8.  
  9.      Copyright:    © 1989-1993, 1995-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __PPCTOOLBOX__
  19. #define __PPCTOOLBOX__
  20.  
  21. #ifndef __MACTYPES__
  22. #include <MacTypes.h>
  23. #endif
  24. #ifndef __APPLETALK__
  25. #include <AppleTalk.h>
  26. #endif
  27.  
  28.  
  29.  
  30. #if PRAGMA_ONCE
  31. #pragma once
  32. #endif
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. #if PRAGMA_IMPORT
  39. #pragma import on
  40. #endif
  41.  
  42. #if PRAGMA_STRUCT_ALIGN
  43.     #pragma options align=mac68k
  44. #elif PRAGMA_STRUCT_PACKPUSH
  45.     #pragma pack(push, 2)
  46. #elif PRAGMA_STRUCT_PACK
  47.     #pragma pack(2)
  48. #endif
  49.  
  50. typedef unsigned char                     PPCServiceType;
  51.  
  52. enum {
  53.     ppcServiceRealTime            = 1
  54. };
  55.  
  56. typedef short                             PPCLocationKind;
  57.  
  58. enum {
  59.     ppcNoLocation                = 0,                            /* There is no PPCLocName */
  60.     ppcNBPLocation                = 1,                            /* Use AppleTalk NBP      */
  61.     ppcNBPTypeLocation            = 2                                /* Used for specifying a location name type during PPCOpen only */
  62. };
  63.  
  64. typedef short                             PPCPortKinds;
  65.  
  66. enum {
  67.     ppcByCreatorAndType            = 1,                            /* Port type is specified as colloquial Mac creator and type */
  68.     ppcByString                    = 2                                /* Port type is in pascal string format */
  69. };
  70.  
  71. /* Values returned for request field in PPCInform call */
  72. typedef unsigned char                     PPCSessionOrigin;
  73.  
  74. enum {
  75.                                                                 /* Values returned for requestType field in PPCInform call */
  76.     ppcLocalOrigin                = 1,                            /* session originated from this machine */
  77.     ppcRemoteOrigin                = 2                                /* session originated from remote machine */
  78. };
  79.  
  80. typedef short                             PPCPortRefNum;
  81. typedef long                             PPCSessRefNum;
  82.  
  83. struct PPCPortRec {
  84.     ScriptCode                         nameScript;                    /* script of name */
  85.     Str32Field                         name;                        /* name of port as seen in browser */
  86.     PPCPortKinds                     portKindSelector;            /* which variant */
  87.     union {
  88.         Str32                             portTypeStr;            /* pascal type string */
  89.         struct {
  90.             OSType                             portCreator;
  91.             OSType                             portType;
  92.         }                                 port;
  93.     }                                 u;
  94. };
  95. typedef struct PPCPortRec                PPCPortRec;
  96.  
  97. typedef PPCPortRec *                    PPCPortPtr;
  98.  
  99. struct LocationNameRec {
  100.     PPCLocationKind                 locationKindSelector;        /* which variant */
  101.     union {
  102.         EntityName                         nbpEntity;                /* NBP name entity */
  103.         Str32                             nbpType;                /* just the NBP type string, for PPCOpen */
  104.     }                                 u;
  105. };
  106. typedef struct LocationNameRec            LocationNameRec;
  107.  
  108. typedef LocationNameRec *                LocationNamePtr;
  109.  
  110. struct PortInfoRec {
  111.     SInt8                             filler1;
  112.     Boolean                         authRequired;
  113.     PPCPortRec                         name;
  114. };
  115. typedef struct PortInfoRec                PortInfoRec;
  116.  
  117. typedef PortInfoRec *                    PortInfoPtr;
  118. typedef PortInfoRec *                    PortInfoArrayPtr;
  119. typedef union PPCParamBlockRec             PPCParamBlockRec;
  120. typedef PPCParamBlockRec *                PPCParamBlockPtr;
  121. typedef CALLBACK_API( void , PPCCompProcPtr )(PPCParamBlockPtr pb);
  122. typedef STACK_UPP_TYPE(PPCCompProcPtr)                             PPCCompUPP;
  123. #define PPCHeader \
  124.      Ptr            qLink;                   /* PPC's Internal Use */\
  125.      unsigned short csCode;                   /* Requested PPC command */\
  126.      unsigned short intUse;                   /* Internal Use */\
  127.      Ptr            intUsePtr;              /* Internal Use */\
  128.      PPCCompUPP     ioCompletion;            /* 12 --> Completion Routine */\
  129.      OSErr           ioResult;                  /* 16 <-- Command Result Code */\
  130.      unsigned long    Reserved[5];             /* Reserved for PPC, Don't use */
  131.  
  132.  
  133. struct PPCOpenPBRec {
  134.     Ptr                             qLink;                        /* PPC's Internal Use */
  135.     unsigned short                     csCode;                        /* Requested PPC command */
  136.     unsigned short                     intUse;                        /* Internal Use */
  137.     Ptr                             intUsePtr;                    /* Internal Use */
  138.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  139.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  140.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  141.     PPCPortRefNum                     portRefNum;                    /* 38 <--   Port Reference */
  142.     long                             filler1;
  143.     PPCServiceType                     serviceType;                /* 44 -->    Bit field describing the requested port service */
  144.     UInt8                             resFlag;                    /* Must be set to 0 */
  145.     PPCPortPtr                         portName;                    /* 46 -->   PortName for PPC */
  146.     LocationNamePtr                 locationName;                /* 50 -->   If NBP Registration is required */
  147.     Boolean                         networkVisible;                /* 54 -->   make this network visible on network */
  148.     Boolean                         nbpRegistered;                /* 55 <--   The given location name was registered on the network */
  149. };
  150. typedef struct PPCOpenPBRec                PPCOpenPBRec;
  151.  
  152. typedef PPCOpenPBRec *                    PPCOpenPBPtr;
  153.  
  154. struct PPCInformPBRec {
  155.     Ptr                             qLink;                        /* PPC's Internal Use */
  156.     unsigned short                     csCode;                        /* Requested PPC command */
  157.     unsigned short                     intUse;                        /* Internal Use */
  158.     Ptr                             intUsePtr;                    /* Internal Use */
  159.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  160.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  161.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  162.     PPCPortRefNum                     portRefNum;                    /* 38 -->   Port Identifier */
  163.     PPCSessRefNum                     sessRefNum;                    /* 40 <--   Session Reference */
  164.     PPCServiceType                     serviceType;                /* 44 <--   Status Flags for type of session, local, remote */
  165.     Boolean                         autoAccept;                    /* 45 -->   if true session will be accepted automatically */
  166.     PPCPortPtr                         portName;                    /* 46 -->   Buffer for Source PPCPortRec */
  167.     LocationNamePtr                 locationName;                /* 50 -->   Buffer for Source LocationNameRec */
  168.     StringPtr                         userName;                    /* 54 -->   Buffer for Soure user's name trying to link. */
  169.     unsigned long                     userData;                    /* 58 <--   value included in PPCStart's userData */
  170.     PPCSessionOrigin                 requestType;                /* 62 <--   Local or Network */
  171.     SInt8                             filler;
  172. };
  173. typedef struct PPCInformPBRec            PPCInformPBRec;
  174.  
  175. typedef PPCInformPBRec *                PPCInformPBPtr;
  176.  
  177. struct PPCStartPBRec {
  178.     Ptr                             qLink;                        /* PPC's Internal Use */
  179.     unsigned short                     csCode;                        /* Requested PPC command */
  180.     unsigned short                     intUse;                        /* Internal Use */
  181.     Ptr                             intUsePtr;                    /* Internal Use */
  182.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  183.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  184.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  185.     PPCPortRefNum                     portRefNum;                    /* 38 -->   Port Identifier */
  186.     PPCSessRefNum                     sessRefNum;                    /* 40 <--   Session Reference */
  187.     PPCServiceType                     serviceType;                /* 44 <--   Actual service method (realTime) */
  188.     UInt8                             resFlag;                    /* 45 -->   Must be set to 0  */
  189.     PPCPortPtr                         portName;                    /* 46 -->   Destination portName */
  190.     LocationNamePtr                 locationName;                /* 50 -->   NBP or NAS style service location name */
  191.     unsigned long                     rejectInfo;                    /* 54 <--   reason for rejecting the session request */
  192.     unsigned long                     userData;                    /* 58 -->   Copied to destination PPCInform parameter block */
  193.     unsigned long                     userRefNum;                    /* 62 -->   userRefNum (obtained during login process)  */
  194. };
  195. typedef struct PPCStartPBRec            PPCStartPBRec;
  196.  
  197. typedef PPCStartPBRec *                    PPCStartPBPtr;
  198.  
  199. struct PPCAcceptPBRec {
  200.     Ptr                             qLink;                        /* PPC's Internal Use */
  201.     unsigned short                     csCode;                        /* Requested PPC command */
  202.     unsigned short                     intUse;                        /* Internal Use */
  203.     Ptr                             intUsePtr;                    /* Internal Use */
  204.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  205.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  206.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  207.     short                             filler1;
  208.     PPCSessRefNum                     sessRefNum;                    /* 40 -->   Session Reference */
  209. };
  210. typedef struct PPCAcceptPBRec            PPCAcceptPBRec;
  211.  
  212. typedef PPCAcceptPBRec *                PPCAcceptPBPtr;
  213.  
  214. struct PPCRejectPBRec {
  215.     Ptr                             qLink;                        /* PPC's Internal Use */
  216.     unsigned short                     csCode;                        /* Requested PPC command */
  217.     unsigned short                     intUse;                        /* Internal Use */
  218.     Ptr                             intUsePtr;                    /* Internal Use */
  219.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  220.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  221.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  222.     short                             filler1;
  223.     PPCSessRefNum                     sessRefNum;                    /* 40 -->   Session Reference */
  224.     short                             filler2;
  225.     long                             filler3;
  226.     long                             filler4;
  227.     unsigned long                     rejectInfo;                    /* 54 -->   reason for rejecting the session request  */
  228. };
  229. typedef struct PPCRejectPBRec            PPCRejectPBRec;
  230.  
  231. typedef PPCRejectPBRec *                PPCRejectPBPtr;
  232.  
  233. struct PPCWritePBRec {
  234.     Ptr                             qLink;                        /* PPC's Internal Use */
  235.     unsigned short                     csCode;                        /* Requested PPC command */
  236.     unsigned short                     intUse;                        /* Internal Use */
  237.     Ptr                             intUsePtr;                    /* Internal Use */
  238.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  239.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  240.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  241.     short                             filler1;
  242.     PPCSessRefNum                     sessRefNum;                    /* 40 -->   Session Reference */
  243.     Size                             bufferLength;                /* 44 -->   Length of the message buffer */
  244.     Size                             actualLength;                /* 48 <--   Actual Length Written */
  245.     Ptr                             bufferPtr;                    /* 52 -->   Pointer to message buffer */
  246.     Boolean                         more;                        /* 56 -->   if more data in this block will be written */
  247.     SInt8                             filler2;
  248.     unsigned long                     userData;                    /* 58 -->   Message block userData Uninterpreted by PPC */
  249.     OSType                             blockCreator;                /* 62 -->   Message block creator Uninterpreted by PPC */
  250.     OSType                             blockType;                    /* 66 -->   Message block type Uninterpreted by PPC */
  251. };
  252. typedef struct PPCWritePBRec            PPCWritePBRec;
  253.  
  254. typedef PPCWritePBRec *                    PPCWritePBPtr;
  255.  
  256. struct PPCReadPBRec {
  257.     Ptr                             qLink;                        /* PPC's Internal Use */
  258.     unsigned short                     csCode;                        /* Requested PPC command */
  259.     unsigned short                     intUse;                        /* Internal Use */
  260.     Ptr                             intUsePtr;                    /* Internal Use */
  261.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  262.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  263.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  264.     short                             filler1;
  265.     PPCSessRefNum                     sessRefNum;                    /* 40 -->   Session Reference */
  266.     Size                             bufferLength;                /* 44 -->   Length of the message buffer */
  267.     Size                             actualLength;                /* 48 <--   Actual length read */
  268.     Ptr                             bufferPtr;                    /* 52 -->   Pointer to message buffer */
  269.     Boolean                         more;                        /* 56 <--   if true more data in this block to be read */
  270.     SInt8                             filler2;
  271.     unsigned long                     userData;                    /* 58 <--   Message block userData Uninterpreted by PPC */
  272.     OSType                             blockCreator;                /* 62 <--   Message block creator Uninterpreted by PPC */
  273.     OSType                             blockType;                    /* 66 <--   Message block type Uninterpreted by PPC */
  274. };
  275. typedef struct PPCReadPBRec                PPCReadPBRec;
  276.  
  277. typedef PPCReadPBRec *                    PPCReadPBPtr;
  278.  
  279. struct PPCEndPBRec {
  280.     Ptr                             qLink;                        /* PPC's Internal Use */
  281.     unsigned short                     csCode;                        /* Requested PPC command */
  282.     unsigned short                     intUse;                        /* Internal Use */
  283.     Ptr                             intUsePtr;                    /* Internal Use */
  284.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  285.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  286.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  287.     short                             filler1;
  288.     PPCSessRefNum                     sessRefNum;                    /* 40 -->   Session Reference */
  289. };
  290. typedef struct PPCEndPBRec                PPCEndPBRec;
  291.  
  292. typedef PPCEndPBRec *                    PPCEndPBPtr;
  293.  
  294. struct PPCClosePBRec {
  295.     Ptr                             qLink;                        /* PPC's Internal Use */
  296.     unsigned short                     csCode;                        /* Requested PPC command */
  297.     unsigned short                     intUse;                        /* Internal Use */
  298.     Ptr                             intUsePtr;                    /* Internal Use */
  299.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  300.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  301.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  302.     PPCPortRefNum                     portRefNum;                    /* 38 -->   Port Identifier */
  303. };
  304. typedef struct PPCClosePBRec            PPCClosePBRec;
  305.  
  306. typedef PPCClosePBRec *                    PPCClosePBPtr;
  307.  
  308. struct IPCListPortsPBRec {
  309.     Ptr                             qLink;                        /* PPC's Internal Use */
  310.     unsigned short                     csCode;                        /* Requested PPC command */
  311.     unsigned short                     intUse;                        /* Internal Use */
  312.     Ptr                             intUsePtr;                    /* Internal Use */
  313.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  314.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  315.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  316.     short                             filler1;
  317.     unsigned short                     startIndex;                    /* 40 -->   Start Index */
  318.     unsigned short                     requestCount;                /* 42 -->   Number of entries to be returned */
  319.     unsigned short                     actualCount;                /* 44 <--   Actual Number of entries to be returned */
  320.     PPCPortPtr                         portName;                    /* 46 -->   PortName Match */
  321.     LocationNamePtr                 locationName;                /* 50 -->   NBP or NAS type name to locate the Port Location */
  322.     PortInfoArrayPtr                 bufferPtr;                    /* 54 -->   Pointer to a buffer requestCount*sizeof(PortInfo) bytes big */
  323. };
  324. typedef struct IPCListPortsPBRec        IPCListPortsPBRec;
  325.  
  326. typedef IPCListPortsPBRec *                IPCListPortsPBPtr;
  327.  
  328. union PPCParamBlockRec {
  329.     PPCOpenPBRec                     openParam;
  330.     PPCInformPBRec                     informParam;
  331.     PPCStartPBRec                     startParam;
  332.     PPCAcceptPBRec                     acceptParam;
  333.     PPCRejectPBRec                     rejectParam;
  334.     PPCWritePBRec                     writeParam;
  335.     PPCReadPBRec                     readParam;
  336.     PPCEndPBRec                     endParam;
  337.     PPCClosePBRec                     closeParam;
  338.     IPCListPortsPBRec                 listPortsParam;
  339. };
  340.  
  341. /*  PPC Calling Conventions  */
  342.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  343.                                                                                             #pragma parameter __D0 PPCInit
  344.                                                                                             #endif
  345. EXTERN_API( OSErr )
  346. PPCInit                            (void)                                                        TWOWORDINLINE(0x7000, 0xA0DD);
  347.  
  348.  
  349.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  350.                                                                                             #pragma parameter __D0 PPCOpenSync(__A0)
  351.                                                                                             #endif
  352. EXTERN_API( OSErr )
  353. PPCOpenSync                        (PPCOpenPBPtr             pb)                                    TWOWORDINLINE(0x7001, 0xA0DD);
  354.  
  355.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  356.                                                                                             #pragma parameter __D0 PPCOpenAsync(__A0)
  357.                                                                                             #endif
  358. EXTERN_API( OSErr )
  359. PPCOpenAsync                    (PPCOpenPBPtr             pb)                                    TWOWORDINLINE(0x7001, 0xA4DD);
  360.  
  361.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  362.                                                                                             #pragma parameter __D0 PPCInformSync(__A0)
  363.                                                                                             #endif
  364. EXTERN_API( OSErr )
  365. PPCInformSync                    (PPCInformPBPtr         pb)                                    TWOWORDINLINE(0x7003, 0xA0DD);
  366.  
  367.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  368.                                                                                             #pragma parameter __D0 PPCInformAsync(__A0)
  369.                                                                                             #endif
  370. EXTERN_API( OSErr )
  371. PPCInformAsync                    (PPCInformPBPtr         pb)                                    TWOWORDINLINE(0x7003, 0xA4DD);
  372.  
  373.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  374.                                                                                             #pragma parameter __D0 PPCStartSync(__A0)
  375.                                                                                             #endif
  376. EXTERN_API( OSErr )
  377. PPCStartSync                    (PPCStartPBPtr             pb)                                    TWOWORDINLINE(0x7002, 0xA0DD);
  378.  
  379.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  380.                                                                                             #pragma parameter __D0 PPCStartAsync(__A0)
  381.                                                                                             #endif
  382. EXTERN_API( OSErr )
  383. PPCStartAsync                    (PPCStartPBPtr             pb)                                    TWOWORDINLINE(0x7002, 0xA4DD);
  384.  
  385.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  386.                                                                                             #pragma parameter __D0 PPCAcceptSync(__A0)
  387.                                                                                             #endif
  388. EXTERN_API( OSErr )
  389. PPCAcceptSync                    (PPCAcceptPBPtr         pb)                                    TWOWORDINLINE(0x7004, 0xA0DD);
  390.  
  391.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  392.                                                                                             #pragma parameter __D0 PPCAcceptAsync(__A0)
  393.                                                                                             #endif
  394. EXTERN_API( OSErr )
  395. PPCAcceptAsync                    (PPCAcceptPBPtr         pb)                                    TWOWORDINLINE(0x7004, 0xA4DD);
  396.  
  397.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  398.                                                                                             #pragma parameter __D0 PPCRejectSync(__A0)
  399.                                                                                             #endif
  400. EXTERN_API( OSErr )
  401. PPCRejectSync                    (PPCRejectPBPtr         pb)                                    TWOWORDINLINE(0x7005, 0xA0DD);
  402.  
  403.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  404.                                                                                             #pragma parameter __D0 PPCRejectAsync(__A0)
  405.                                                                                             #endif
  406. EXTERN_API( OSErr )
  407. PPCRejectAsync                    (PPCRejectPBPtr         pb)                                    TWOWORDINLINE(0x7005, 0xA4DD);
  408.  
  409.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  410.                                                                                             #pragma parameter __D0 PPCWriteSync(__A0)
  411.                                                                                             #endif
  412. EXTERN_API( OSErr )
  413. PPCWriteSync                    (PPCWritePBPtr             pb)                                    TWOWORDINLINE(0x7006, 0xA0DD);
  414.  
  415.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  416.                                                                                             #pragma parameter __D0 PPCWriteAsync(__A0)
  417.                                                                                             #endif
  418. EXTERN_API( OSErr )
  419. PPCWriteAsync                    (PPCWritePBPtr             pb)                                    TWOWORDINLINE(0x7006, 0xA4DD);
  420.  
  421.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  422.                                                                                             #pragma parameter __D0 PPCReadSync(__A0)
  423.                                                                                             #endif
  424. EXTERN_API( OSErr )
  425. PPCReadSync                        (PPCReadPBPtr             pb)                                    TWOWORDINLINE(0x7007, 0xA0DD);
  426.  
  427.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  428.                                                                                             #pragma parameter __D0 PPCReadAsync(__A0)
  429.                                                                                             #endif
  430. EXTERN_API( OSErr )
  431. PPCReadAsync                    (PPCReadPBPtr             pb)                                    TWOWORDINLINE(0x7007, 0xA4DD);
  432.  
  433.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  434.                                                                                             #pragma parameter __D0 PPCEndSync(__A0)
  435.                                                                                             #endif
  436. EXTERN_API( OSErr )
  437. PPCEndSync                        (PPCEndPBPtr             pb)                                    TWOWORDINLINE(0x7008, 0xA0DD);
  438.  
  439.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  440.                                                                                             #pragma parameter __D0 PPCEndAsync(__A0)
  441.                                                                                             #endif
  442. EXTERN_API( OSErr )
  443. PPCEndAsync                        (PPCEndPBPtr             pb)                                    TWOWORDINLINE(0x7008, 0xA4DD);
  444.  
  445.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  446.                                                                                             #pragma parameter __D0 PPCCloseSync(__A0)
  447.                                                                                             #endif
  448. EXTERN_API( OSErr )
  449. PPCCloseSync                    (PPCClosePBPtr             pb)                                    TWOWORDINLINE(0x7009, 0xA0DD);
  450.  
  451.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  452.                                                                                             #pragma parameter __D0 PPCCloseAsync(__A0)
  453.                                                                                             #endif
  454. EXTERN_API( OSErr )
  455. PPCCloseAsync                    (PPCClosePBPtr             pb)                                    TWOWORDINLINE(0x7009, 0xA4DD);
  456.  
  457.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  458.                                                                                             #pragma parameter __D0 IPCListPortsSync(__A0)
  459.                                                                                             #endif
  460. EXTERN_API( OSErr )
  461. IPCListPortsSync                (IPCListPortsPBPtr         pb)                                    TWOWORDINLINE(0x700A, 0xA0DD);
  462.  
  463.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  464.                                                                                             #pragma parameter __D0 IPCListPortsAsync(__A0)
  465.                                                                                             #endif
  466. EXTERN_API( OSErr )
  467. IPCListPortsAsync                (IPCListPortsPBPtr         pb)                                    TWOWORDINLINE(0x700A, 0xA4DD);
  468.  
  469. EXTERN_API( OSErr )
  470. DeleteUserIdentity                (unsigned long             userRef);
  471.  
  472. EXTERN_API( OSErr )
  473. GetDefaultUser                    (unsigned long *        userRef,
  474.                                  Str32                     userName);
  475.  
  476. EXTERN_API( OSErr )
  477. StartSecureSession                (PPCStartPBPtr             pb,
  478.                                  Str32                     userName,
  479.                                  Boolean                 useDefault,
  480.                                  Boolean                 allowGuest,
  481.                                  Boolean *                guestSelected,
  482.                                  ConstStr255Param         prompt);
  483.  
  484. typedef CALLBACK_API( Boolean , PPCFilterProcPtr )(LocationNamePtr name, PortInfoPtr port);
  485. typedef STACK_UPP_TYPE(PPCFilterProcPtr)                         PPCFilterUPP;
  486. enum { uppPPCCompProcInfo = 0x000000C0 };                         /* pascal no_return_value Func(4_bytes) */
  487. enum { uppPPCFilterProcInfo = 0x000003D0 };                     /* pascal 1_byte Func(4_bytes, 4_bytes) */
  488. #define NewPPCCompProc(userRoutine)                             (PPCCompUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPPCCompProcInfo, GetCurrentArchitecture())
  489. #define NewPPCFilterProc(userRoutine)                             (PPCFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPPCFilterProcInfo, GetCurrentArchitecture())
  490. #define CallPPCCompProc(userRoutine, pb)                         CALL_ONE_PARAMETER_UPP((userRoutine), uppPPCCompProcInfo, (pb))
  491. #define CallPPCFilterProc(userRoutine, name, port)                 CALL_TWO_PARAMETER_UPP((userRoutine), uppPPCFilterProcInfo, (name), (port))
  492. EXTERN_API( OSErr )
  493. PPCBrowser                        (ConstStr255Param         prompt,
  494.                                  ConstStr255Param         applListLabel,
  495.                                  Boolean                 defaultSpecified,
  496.                                  LocationNameRec *        theLocation,
  497.                                  PortInfoRec *            thePortInfo,
  498.                                  PPCFilterUPP             portFilter,
  499.                                  ConstStr32Param         theLocNBPType)                        THREEWORDINLINE(0x303C, 0x0D00, 0xA82B);
  500.  
  501.  
  502. /*
  503.   The ParamBlock calls with the "Sync" or "Async" suffix are being phased out.
  504. */
  505. #define PPCOpen(pb, async)      ((async) ? PPCOpenAsync(pb)      : PPCOpenSync(pb))
  506. #define PPCInform(pb, async)    ((async) ? PPCInformAsync(pb)    : PPCInformSync(pb))
  507. #define PPCStart(pb, async)     ((async) ? PPCStartAsync(pb)     : PPCStartSync(pb))
  508. #define PPCAccept(pb, async)    ((async) ? PPCAcceptAsync(pb)    : PPCAcceptSync(pb))
  509. #define PPCReject(pb, async)    ((async) ? PPCRejectAsync(pb)    : PPCRejectSync(pb))
  510. #define PPCWrite(pb, async)     ((async) ? PPCWriteAsync(pb)     : PPCWriteSync(pb))
  511. #define PPCRead(pb, async)      ((async) ? PPCReadAsync(pb)      : PPCReadSync(pb))
  512. #define PPCEnd(pb, async)       ((async) ? PPCEndAsync(pb)       : PPCEndSync(pb))
  513. #define PPCClose(pb, async)     ((async) ? PPCCloseAsync(pb)     : PPCCloseSync(pb))
  514. #define IPCListPorts(pb, async) ((async) ? IPCListPortsAsync(pb) : IPCListPortsSync(pb))
  515.  
  516.  
  517.  
  518. #if PRAGMA_STRUCT_ALIGN
  519.     #pragma options align=reset
  520. #elif PRAGMA_STRUCT_PACKPUSH
  521.     #pragma pack(pop)
  522. #elif PRAGMA_STRUCT_PACK
  523.     #pragma pack()
  524. #endif
  525.  
  526. #ifdef PRAGMA_IMPORT_OFF
  527. #pragma import off
  528. #elif PRAGMA_IMPORT
  529. #pragma import reset
  530. #endif
  531.  
  532. #ifdef __cplusplus
  533. }
  534. #endif
  535.  
  536. #endif /* __PPCTOOLBOX__ */
  537.  
  538.